﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
  <xsl:output method="html" indent="yes"/>
  <xsl:template match="Comments">
    <!-- BEGIN .content-box -->
    <div class='content-box'>
      <h3>Recent Comments</h3>
      <ul class='sidelist'>
        <xsl:apply-templates/>
      </ul>
      <!-- END .content-box -->
    </div>
  </xsl:template>
  <xsl:template match="NoComment">
    <li>
      <xsl:value-of select="Title" />
    </li>
  </xsl:template>  
  <xsl:template match="Comment">
    <xsl:variable name="Comment">
      <xsl:value-of select="Comment" disable-output-escaping="yes" />
    </xsl:variable>
    <li>
      <xsl:value-of select="PostName" disable-output-escaping="yes" /> <br />     
        <xsl:value-of select="Name" /> says,
      <br />
      <xsl:value-of select="substring($Comment,1,40)"/>...
    </li>
  </xsl:template>
</xsl:stylesheet>
